Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 3 - Finder Commands


Command Definitions

This section defines the commands that are understood by the Finder and
its objects.

The Finder supports most of the standard application commands described
in the AppleScript Language Guide. As is true for most scriptable applications,
the Finder's definitions for some of these commands differ slightly from the standard definitions. Table 3-1 summarizes the differences between the defined behavior of the standard commands and the Finder behavior.
Variations from standard behavior in Finder versions of standard application commands
CommandFinder version
CloseCloses one or more containers. Behaves like the standard version, except that the Finder needn't save data when it
closes containers.
CopyCopies an object or objects. Behaves like the standard version, except that the Finder version must include parameters.
 
CountCounts elements of a particular class in a container. Behaves
like the standard version, except that the Finder always returns
a single integer, never a list of integers.
Data SizeReturns the size, in bytes, of the value returned by a Get command on the same object or objects. Identical to the
standard version.
DeleteDeletes one or more objects. Identical to the standard version.
DuplicateCopies an object or objects. Behaves like the standard version, and also allows you to specify whether or not to replace items
in the destination container.
ExistsDetermines whether an object exists. Identical to the
standard version.
GetReturns the value of an object. Identical to the standard version, except that it returns references for most Finder objects rather than values.
MakeCreates a new object. Behaves like the standard version, except that the Finder can't set the value of the data for most new objects, and you can't use new when you make a new file.
MoveMoves an object or objects. Behaves like the standard version, and also allows you to specify whether or not to replace items
in the destination container.
OpenOpens an object or objects. Behaves like the standard version, except that it can open objects such as folders and suitcases as well as files.
PrintPrints one or more objects. Identical to the standard version.
QuitTerminates the Finder process. Behaves like the standard version, except that the Finder need not save data before terminating.
SetSets value of one or more objects. Identical to standard version.

Table 3-2 lists the commands defined by the Finder Suite--that is, the commands unique to the Finder.
Commands defined by the Finder Suite
CommandSummary
Clean UpAligns the icons in a window or on the desktop along the grid pattern selected in the Views control panel.
ComputerReturns information about the local computer's operating environment.
EjectEjects a disk.
EmptyEmpties the trash.
EraseErases a disk.
Put AwayReturns specified objects on the desktop or in the Trash to the folders or disks to which they belong.
RestartRestarts the computer.
RevealMakes an object visible by opening its container and selecting it.
SelectSelects specified objects.
Shut DownShuts down the computer.
SleepPuts a PowerBook to sleep.
SortSorts a list of references to Finder objects.
UpdateUpdates an object and its elements, if any, to match their representation on disk.

The rest of this chapter provides detailed definitions of the commands summarized in Table 3-1 and Table 3-2.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996